{% load i18n static likes_tags %}
<p class="like-widget">
    <button type="button"
            class="like-button btn btn-primary{% if object|liked_by:request.user %} active{% endif %}"
            data-href="{% url "likes:json_set_like" content_type_id=content_type_id object_id=object.pk %}"
            data-remove-label="{% trans "Like" %}"
            data-add-label="{% trans "Unlike" %}">
        {% if object|liked_by:request.user %}
            {% trans "Unlike" %}
        {% else %}
            {% trans "Like" %}
        {% endif %}
    </button>
    <span class="like-badge badge badge-secondary">
        {{ object|liked_count }}</span>
</p>
<script src="{% static 'likes/js/widget.js' %}"></script>
